package cn.attackme.myuploader.service.impl;

import cn.attackme.myuploader.dao.SectionDao;
import cn.attackme.myuploader.model.Section;
import cn.attackme.myuploader.service.SectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class SectionServiceImpl implements SectionService {
    @Autowired
    private SectionDao sectionDao;


    @Override
    public Section getSection(Long id) {
        return sectionDao.getSection(id);
    }

    @Override
    public int add(Section section) {
        return sectionDao.add(section);
    }

    @Override
    public int update(Section section) {
        return sectionDao.update(section);
    }

    @Override
    public int delete(Long id) {
        return sectionDao.deleteById(id);
    }

    @Override
    public List<Map<String, Object>> fandAllList() {
        return sectionDao.fandAllList();
    }
}
